<?php
namespace Src;

class View
{
    public $smarty;//从bean容器中取出smarty对象
    public $response;//从bean容器中取出response对象

    public function __construct()
    {
        $this->response = Bean::get('response');
        $this->smarty = Bean::get('smarty');
        //内置默认模态框为hide
        $this->modalSet('hide');
    }

    //模态设置
    public function modalSet($modal_show, $modal_message = '', $modal_url = '')
    {
        $this->smarty->smarty->assign('modal_message', $modal_message);
        $this->smarty->smarty->assign('modal_show', $modal_show);
        $this->smarty->smarty->assign('modal_url', $modal_url);
    }

    private function __clone() {}

    public function __destruct() {}

}